package de.fhaugsburg.games.boardgames;
/**
 * A class for a player of a boardgame. it contains his name, a unique id and his points.
 * @author r4smus
 *
 */
public class Player {
	
	private String name;
	private static int idCount = 1;
	private final int id;
	private int points = 0;
	
	public Player(String name) {
		this.name = name;
	    id = idCount++;		
	}
	/**
	 * adds a specific number of points to the player.
	 * @param newPoints
	 */
	public void addPoints(int newPoints){
		points += newPoints;
	}
	public int getPoints(){
		return points;
	}
	public int getId(){
		return id;
	}
	public String getName(){
		return name;
	}
	public String toString(){
		return name +"(id:" +id +", points: "+points +")";
	}

}
